package com.sumainfor.common.visitor;

import net.sf.jsqlparser.statement.select.AllColumns;
import net.sf.jsqlparser.statement.select.AllTableColumns;
import net.sf.jsqlparser.statement.select.SelectExpressionItem;
import net.sf.jsqlparser.statement.select.SelectItemVisitor;

/**
 * @Author Jack Chen
 * @Create 2019-01-18 18:35
 */
public class SelectItemVisitorImpl implements SelectItemVisitor {

    private CustomExpressionEntity expressionEntity;

    public SelectItemVisitorImpl(CustomExpressionEntity expressionEntity) {
        this.expressionEntity = expressionEntity;
    }

    @Override
    public void visit(AllColumns allColumns) {

    }

    @Override
    public void visit(AllTableColumns allTableColumns) {

    }

    @Override
    public void visit(SelectExpressionItem selectExpressionItem) {
        selectExpressionItem.getExpression().accept(new ExpressionVisitorImpl(expressionEntity));
    }
}
